<%@page language="java" pageEncoding="UTF-8"%>
<%@include file="/views/common/include/taglib.jsp"%>
		<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/sectionparent.css" source="widget" />
		<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/admin.css" source="widget" />
	   	<script src="${ctx}/js/controllers/store/storebanner/StoreBannerEditController.js" type="text/javascript"></script>
	   	<style>
	   		select{
	   			padding-left: 4px;
    			font-size: 10px;
   				border-radius: 10px;
    			background-image: none;
   				border: 1px solid #dadada;
   				color:#8b8b8b;
	   		}
	   		.checkTitle ul li{
	   		color:#565252;
	   		font-size:14px;
	   		float: left;
	   		}
	   		.checkTitle ul li  a:active {
	   		border-right: 1px solid #CBD5DD;
		    padding: 2px 15px 12px 15px;
		    border-top: 1px solid #cbd5dd;
	   		}
	   		
	   		.checkTitle li.active {
			border-color: #CBD5DD !important;
			border-bottom-color: #fff !important;
			}
			
			.btn_addPic{
		    display: inline-block;
		    position: relative;
		    height: 41px;
		    overflow: hidden;
		    padding: 0 20px;
		    border: 1px solid #EBEBEB;
		    background: none repeat scroll 0 0 #F9C771;
		    color: #fff;
		    font: 14px/39px 'MicroSoft Yahei','Simhei';
		    cursor: pointer;
		    text-align: center;
		    margin-top: 20px;
		    margin-left: 20px;
		    width:140px;
			}
			.inputClass{
			height: 30px;
		    width: 200px;
		    margin-left: 20px;
		    margin-top: 25px;
		    border: 1px solid #CBD5DD;
		    text-indent: 10px;
		    float:left;
			}
			.addorcancleAttr{
			width:45px;
			height:25px;
			margin-left:10px;
			padding-top:5px;
			padding-left:10px;
			background-color:#F9C771;
			color:white;
			cursor: pointer;
			float:left;
			margin-top: 26px;
			}
		</style>
		
		  <div style="top:130px;position:fixed;height:30px;font-size: 14px;font-family: '微软雅黑';margin-left:-236px;">
				当前位置：${sessionScope.currcent_position}
          </div>
   		<section>
	         <div class="panel panel-default" style="margin-top:16px;">
					<div class="forword_area"></div>
					<div class="location">编辑店铺装修信息</div>
			</div>
         
				<div id="shopBanner" class="form" style="min-height:350px;border: 1px solid #dadada;">
					<div class="itemEditMap" style="margin-left:-100px;">
						<input id="storeBannerId" type="hidden" value="${shopBanner.id }">
						<input id="imageLogo" type="hidden" value="${shopBanner.img }">
						<span class="col-sm-1 editlableEditMap">图片缩略图：</span>
						<div class="flEditMap" style="margin-top:45px;">
						
							<c:if test="${shopBanner.img == null || shopBanner.img == ''}">
									<img id="preview3" style="width:100px;height:100px;float:left;" title="快上传图片吧" src="${ctx}/images/seller/ad/ad_default.png" />
							</c:if>
							<c:if test="${shopBanner.img != null && shopBanner.img != ''}">
								<img id="preview3" style="width:100px;height:100px;float:left;" src="${sessionScope.image_logo}${shopBanner.img}" />
							</c:if>
							<div class="mtjxsa" style="float:left;margin-top: 40px;">
								  <p style="text-align: left" id="imageBtn">
									  <input type="hidden" name="imageLogoUrl" id="imageLogoUrl" />
									  <img style="margin-left:23px;margin-top: -5px;" src="${ctx}/images/seller/goods/tip.png"/>
									  <span style="color:#262535;font-size:14px;">提示：只能上传.jpg, .png的图片格式,照片文件大小最大为10MB</span>
								  </p>
								  <div>
							    	  <div class="fl">
							    		  <button style="width:100px;height:30px;background-color: #F9C771;border-radius: 4px;color: #fff;margin-top: 10px;border: 0px;" class="acblu tctpsc">上传图片</button>
							          </div>
							      </div>
							  </div>
							<%@include file="/views/common/uploader/picture.jsp" %>
						</div>
					</div>
		<div class="itemEdit" style="margin-left: -100px;">
			<span class="col-sm-1 editlableEdit">标题：</span>
			<div class="flEdit">
				<input class="controlEdit" id="title" type="text" value="${shopBanner.title}" class="text" maxlength="20" style="width: 60%;" onblur="checkTitle()"/>
			</div>
		</div>
		<div class="itemEdit" style="margin-left:-100px;">
						<span class="col-sm-1 editlableEdit">对象类型：</span>
						<div class="flEdit" style="width:16%;">
							 <select id="objType"  class="controlEdit" onblur="checkObjType()"  style="width:100px" required>
							<c:if test="${shopBanner.objType == 1 }"> <option value="1" selected="selected">商品</option></c:if>
							 <c:if test="${shopBanner.objType == 2}"> <option value="2" selected="selected">特殊网页</option></c:if>
		                     </select>
						</div>
						<input id="objTypeee" type="hidden" value="${shopBanner.objType}">
						<input id="shopId" type="hidden" value="${sessionScope.shop_id.id}">
						<c:if test="${shopBanner.objType == 1 }">
						<span  style="height:50px;line-height: 50px;font-size:14px;font-family: '微软雅黑';float: left;">商品：</span>
						<div class="flEdit" style="width:26%;">
						<select id="goodsId"  class="controlEdit"  onblur="checkGoods()"  style="width:130px;" required>
			                 <c:forEach items="${goodsInfos}" var="item" varStatus="cStatus">
										<c:if test="${item.id == objId}"> <option value="${item.id}" >${item.name}</option></c:if>
								        </c:forEach>
		                </select></div></c:if>
		                <c:if test="${shopBanner.objType == 2 }">
		                <span class="col-sm-1 editlableEdit" id="objContent2" style="height:50px;line-height: 50px;font-size:14px;font-family: '微软雅黑';float: left;margin-left: -200px">网页地址：</span>
							<div class="flEdit" style="width:26%;">
							<input class="controlEdit" id="webUrl"  onblur="checkURL()" style="width:117%;"  type="text" maxlength="50" value="${shopBanner.url}"> 
		                </div>
		                </c:if>
					</div>
					<div class="itemEdit" style="margin-left:-100px;">
						<span class="col-sm-1 editlableEdit">备注说明：</span>
						<div class="flEdit">
											<input class="controlEdit" id="memo" type="text" value="${shopBanner.memo}" class="text"
											  maxlength="50" style="width:100%;" placeholder="请输入备注说明（最多50字）"/>
										</div>
					</div>
			<div class="foot">
				<div style="float:left;margin-left:40%;">
					<button class="buttonCancle" onclick="cancel();">取&nbsp;&nbsp;消</button>
				</div>
				<div style="float:left;padding-left:5%;">
					<button class="buttonEdit" onclick="saveStoreBanner()">保&nbsp;&nbsp;存</button>
				</div>
			</div>
	</div>
		</section>
    	<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
	</script> 
	<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
	<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
